package com.xs.ai.controller;


import com.xs.ai.services.BookingTools;
import com.xs.ai.services.BookingTools.BookingDetails;
import com.xs.ai.services.FlightBookingService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@CrossOrigin
@RequiredArgsConstructor
public class BookingController {
	private final FlightBookingService flightBookingService;

	@CrossOrigin
	@GetMapping(value = "/booking/list")
	public List<BookingDetails> getBookings() {
		return flightBookingService.getBookings();
	}

}
